package cn.tedu._04weibo.pojo.dto;

import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;

@Data
public class UserRegParam {
    private Integer id;
    @Size(min = 4,max = 12,message = "用户名长度为4-12位，")
    @Pattern(
            regexp = "^(?!.*(.)\\1{2,}).*$",
            flags = Pattern.Flag.DOTALL,  // 确保匹配所有字符（包括换行符）
            message = "不能连续出现3个及以上相同字符"
    )
    private String username;
    private String password;
    private String nickname;

}
